//
//  SSGroupTableCell.m
//  textDemo
//
//  Created by Esther on 2017/2/20.
//  Copyright © 2017年 Esther. All rights reserved.
//

#import "SSGroupTableCell.h"
#import <UIImageView+WebCache.h>

@interface SSGroupTableCell()
@property(nonatomic, strong) UIImageView *groupImageView;

@end
@implementation SSGroupTableCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self addSubview:self.groupImageView];
        
    }
    return self;
}

- (void)layoutSubviews{
    [super layoutSubviews];
    __weak typeof (self) weakSelf = self;
    [_groupImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(weakSelf);
        
    }];
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setGroupImageString:(SSFocus *)groupImageString{
    _groupImageString = groupImageString;
    [self.groupImageView sd_setImageWithURL:[NSURL URLWithString:groupImageString.img] placeholderImage:[UIImage imageNamed:@"icomImage"]];

}

#pragma mark -
#pragma mark - 懒加载
- (UIImageView *)groupImageView{
    if (!_groupImageView) {
        _groupImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"icomImage"]];
        
    }
    return _groupImageView;
    
}

@end
